package com.woniuxy.commons.service;


import com.github.pagehelper.PageInfo;
import com.woniuxy.commons.entity.Medicine;
import com.woniuxy.commons.entity.QueryEntity;
import com.woniuxy.commons.utils.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(name = "medicine")
public interface MedicineService {

    @GetMapping("/medicine/medicine/")
    public ResponseResult<List<Medicine>> findAll();

    @PostMapping("/medicine/medicine/condition")
    public ResponseResult<PageInfo<Medicine>> findAllByCondition(@RequestBody QueryEntity<Medicine> queryEntity);

    @GetMapping("/medicine/medicine/{id}")
    public ResponseResult<Medicine> findOne(@PathVariable("id") int id);

    @PostMapping("/medicine/medicine/batchFind")
    public ResponseResult<List<Medicine>> findBatch(@RequestBody int[] ids);
}
